//(C) Stephen Daly
// www.stephendaly.org
// Date: 11/3/2008


if (!document.all)
  document.captureEvents(Event.MOUSEMOVE)
  
document.onmousemove = getPosition;

var X = 0
var Y = 0

function getPosition(args) 
{
  if (document.all) 
  {
    X = event.clientX + document.body.scrollLeft
    Y = event.clientY + document.body.scrollTop
  }
  
  else 
  {  
    X = args.pageX
    Y = args.pageY
  }  
}

function popUp()
{
    var div;
    
    if(document.getElementById)
      div = document.getElementById('popupWindow'); 
    else if(document.all) 
      div = document.all['popupWindow']; 
    
    if(div.style.display==''&&div.offsetWidth!=undefined&&div.offsetHeight!=undefined) {
      div.style.display = (div.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none'; 
    }
    
    div.style.display = (div.style.display==''||div.style.display=='block')?'none':'block';
    
    X = X + 15;
    
    div.style.left = X+'px';
    div.style.top = Y+'px';
}

